﻿using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
using NPOI.SS.Formula.Functions;

namespace MathTutorPro.Data.Entities
{
    public class Class
    {
        public int Id { get; set; }

        [Required]
        [StringLength(100)]
        public string ClassName { get; set; }  // 如 "微积分_21计科3班"
        // 逻辑外键，关联到AspNetUsers表的Id
        public string TeacherId { get; set; }

        // 导航属性：班级下的学生明细
        //[NotMapped]
        public ICollection<ClassDetail> ClassDetails { get; set; }
        //public List<ClassDetail> ClassDetail { get; set; } = new List<ClassDetail>();

        // 导航属性：班级对应的教师
        //[NotMapped]
        public AppUser Teacher { get; set; }
    }
}
